home *** CD-ROM | disk | FTP | other *** search
- From: CompuWord@msn.com (Meiyu Lin)
- Subject: RE: Newbie question on syntax of pointer to const
- Date: 30 Jan 96 04:05:52 -0800
- References: <4ej9eg$lq6@agate.berkeley.edu>
- Message-ID: <00001a81+00009661@msn.com>
- Path: news.msn.com!msn.com
- Newsgroups: comp.lang.c++
- Organization: The Microsoft Network (msn.com)
-
- (1) const double *pc;
- This is a pointer to a const object of type double.
- *pc = 3.14156 the pointer pc is allowed to change
-
- (2) double const *pc = 3.14156;
- This is the pointer is to be declared as constant
- Since pointer is as constant the value can't be changed.
-
- Hope I am right.
-
-
-